/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb.archive;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ciummo
 */
@Entity
@Table(name = "Report")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Report.findAll", query = "SELECT r FROM Report r"),
    @NamedQuery(name = "Report.findByIdReport", query = "SELECT r FROM Report r WHERE r.idReport = :idReport"),
    @NamedQuery(name = "Report.findByTipo", query = "SELECT r FROM Report r WHERE r.tipo = :tipo"),
    @NamedQuery(name = "Report.findByCodRiferimento", query = "SELECT r FROM Report r WHERE r.codRiferimento = :codRiferimento"),
    @NamedQuery(name = "Report.findByMessaggio", query = "SELECT r FROM Report r WHERE r.messaggio = :messaggio"),
    @NamedQuery(name = "Report.findByData", query = "SELECT r FROM Report r WHERE r.data = :data"),
    @NamedQuery(name = "Report.findByIdUtente", query = "SELECT r FROM Report r WHERE r.idUtente = :idUtente")})
public class Report implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idReport")
    private Integer idReport;
    @Column(name = "tipo")
    private String tipo;
    @Column(name = "codRiferimento")
    private String codRiferimento;
    @Column(name = "messaggio")
    private String messaggio;
    @Column(name = "data")
    private String data;
    @Column(name = "idUtente")
    private String idUtente;

    public Report() {
    }

    public Report(Integer idReport) {
        this.idReport = idReport;
    }

    public Integer getIdReport() {
        return idReport;
    }

    public void setIdReport(Integer idReport) {
        this.idReport = idReport;
    }

    public String getTipo() {
        return tipo;
    }

    public void setTipo(String tipo) {
        this.tipo = tipo;
    }

    public String getCodRiferimento() {
        return codRiferimento;
    }

    public void setCodRiferimento(String codRiferimento) {
        this.codRiferimento = codRiferimento;
    }

    public String getMessaggio() {
        return messaggio;
    }

    public void setMessaggio(String messaggio) {
        this.messaggio = messaggio;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getIdUtente() {
        return idUtente;
    }

    public void setIdUtente(String idUtente) {
        this.idUtente = idUtente;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idReport != null ? idReport.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Report)) {
            return false;
        }
        Report other = (Report) object;
        if ((this.idReport == null && other.idReport != null) || (this.idReport != null && !this.idReport.equals(other.idReport))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ejb.archive.Report[ idReport=" + idReport + " ]";
    }
    
}
